﻿package com.bizmlib.ui.aquadock
{
	import com.bizmlib.ui.composite.UICompositionItem;
	
	
	public class AquaDockItem extends UICompositionItem
	{
		private var __rollOverStrength:Number;
		
		
		
		public function set rollOverStrength(value:Number):void
		{
			var currentRollOverStrength:Number = rollOverStrength;
			__rollOverStrength = value;
			updateRollOverStrength(currentRollOverStrength);
		}
		public function get rollOverStrength():Number
		{
			return __rollOverStrength;
		}
		
		
		protected function afterInit():void
		{
			super.afterInit();
			
			__rollOverStrength = 0;
		}
		
		private function updateRollOverStrength(prevRollOverStrength:Number = undefined):void
		{
			if(rollOverStength>0)
			{
				lastDrawState.isRollOver = false;
				rollOver();
			}
			else
			{
				rollOut();
			}
		}
		
		
		protected function initClickArea(shouldCreate:Boolean = true):void
		{
			super.initClickArea(shouldCreate);
			
			area.mouseEnabled = false;
		}
		protected function updateClickAreaState():void
		{
			super.updateClickAreaState();
			
			area.mouseEnabled = false;
		}
	}
}